package com.project.sianet.fragment;

import com.project.sianet.R;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

public class NetworkLostFragment extends Fragment {

	private int mTitleFrag;
	
	public NetworkLostFragment() {
		mTitleFrag = R.string.network_lost;
		//setRetainInstance(true);
	}
	
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		return inflater.inflate(R.layout.fragment_network_lost, null);
	}
	
	@Override
	public void onActivityCreated(Bundle savedInstanceState) {
		super.onActivityCreated(savedInstanceState);

		if (savedInstanceState != null)
			mTitleFrag = savedInstanceState.getInt("mTitleFrag");
		
		TextView title = (TextView)this.getActivity().findViewById(R.id.tv_title);
		title.setText(mTitleFrag);
        
	}
    
 	@Override
	public void onSaveInstanceState(Bundle outState) {
		super.onSaveInstanceState(outState);
		outState.putInt("mTitleFrag", mTitleFrag);
	}
	
}
